/*
 * @Description:
 * @Version: 2.0
 * @Autor: snzo.chen
 * @Date: 2023-11-30 16:48:51
 * @LastEditors: snzo.chen
 * @LastEditTime: 2023-12-20 10:36:00
 */
import { request } from '@/utils/request';

/**
 * 按Id查询
 * @param params
 * @returns
 */
export function getRoleByManagerId(params: API.UserRoleItem) {
  return request<API.BaseResult<API.RoleItem>>(
    {
      url: '/userRole/getRoleByManagerId',
      method: 'get',
      params,
    },
    {
      isGetDataDirectly: false,
    },
  );
}

/**
 * 更新
 * @param data
 * @returns
 */
export function updateManageRole(data: API.UserRoleItem) {
  return request<API.BaseResult>(
    {
      url: '/userRole/updateManageRole',
      method: 'post',
      data,
    },
    {
      isGetDataDirectly: false,
    },
  );
}
